<?php




class DoAction extends Action {

    public function index(){
        $db = M('post');
        $list = $db->select();
        foreach($list as $k=>$v){
            $time = $v['add_time'];
            $data['add_time'] = $time - 60*60*24*365;
            $db->where("id = " . $v['id'])->data($data)->save();     
        
        }
    }

}